Cifs in alfresco 4 0
This presentation is the property of its rightful owner.
Sponsored Links
1 / 38

CIFS in Alfresco 4.0 PowerPoint PPT Presentation


  • 113 Views
  • Uploaded on
  • Presentation posted in: General

CIFS in Alfresco 4.0. Mark Rogers Senior Software Engineer, Alfresco. Introduction. CIFS and Alfresco in 4.0. Overview Explain some of the issues in previous versions Present the options for changes How you configure shuffle scenarios Q & A Lunch!. CIFS and JLAN and Alfresco. CIFS.

Download Presentation

CIFS in Alfresco 4.0

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Cifs in alfresco 4 0

CIFS in Alfresco 4.0

  • Mark Rogers

  • Senior Software Engineer, Alfresco


Introduction

Introduction


Cifs and alfresco in 4 0

CIFS and Alfresco in 4.0

  • Overview

    • Explain some of the issues in previous versions

    • Present the options for changes

    • How you configure shuffle scenarios

    • Q & A

    • Lunch!


Cifs and jlan and alfresco

CIFS and JLAN and Alfresco

CIFS

NFS

FTP

JLAN

DB Driver

Alfresco


Cifs and jlan

CIFS and JLAN

CIFS

  • File State Cache

    • Packet level metadata

      • Last modified

      • File size

    • Locks

    • Session Information

Protocol Handler

File State Cache

Alfresco


Cifs v alfresco

CIFS v Alfresco

  • CIFS

    • File/Folder

    • Hard coded metadata

    • No Versioning

    • Packet Level Protocol

    • Create, Read, Write,

    • Delete, Rename

    • Many levels of locking

    • Multiple separate operations.

      • Body Level Two

        • Body Level Three

          • Body Level Four

  • Alfresco

    • Content and metadata

    • Versioning

    • Stream Based

    • Optimistic locking

    • Many associations

    • Coarse transactions


Cifs create shuffle

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

File A


Cifs create shuffle1

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

File A

Temp File


Cifs create shuffle2

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Renamed

File A

Temp File

Old File


Cifs create shuffle3

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Renamed

    • Temp File

      moved into place

File A

Temp File

Old File


Cifs create shuffle4

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Renamed

    • Temp File

      moved into place

    • Existing file

      deleted

File A

Temp File

Old File


Issues

Issues


Cifs and alfresco

CIFS and Alfresco

  • Issues

    • Automated Testing

    • Transaction boundary

    • Scenario Handling

    • Alfresco Clustering

    • Error Handling

    • Logging


Issues1

Issues

  • Automated testing

    • Starting with Alfresco 3.4 there are an increasing set of tests for the Alfresco Content Disk Driver.

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Issues2

Issues

  • Clustering

    • Alfresco dependency upon file state cache reduced/removed.

    • JLAN clustered file state cache.

    • Fixed Node Monitor

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Issues3

Issues

  • Transaction boundary

    • Moved transaction boundary down to alfresco

    • Removed all dependency on transactional data from the file state cache

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Issues4

Issues

  • Error Handling

    • Rework

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Issues5

Issues

  • Logging

    • “Alfresco style” log4j logging for Disk Driver and other alfresco code.

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Issues6

Issues

  • Shuffle

    • A new framework/engine for dealing with “shuffle scenarios”

    • Remove all hard coded “shuffle logic

    • Move all shuffle state out of the transactional layers.

  • Issues

    • Automated Testing

    • Clustering

    • Transaction boundary

    • Error Handling

    • Logging

    • Shuffle Scenarios


Cifs shuffles

CIFS Shuffles


Cifs create shuffle5

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Renamed

    • Temp File

      moved into place

    • Existing file

      deleted

File A

Temp File

Old File


Cifs rename shuffle

CIFS Rename Shuffle

  • CIFS Operations

    • File Exists

    • Rename File

    • Create New File

    • Delete Temp File

    • Scenario Fires

File A

File A ~


Cifs shuffles1

CIFS Shuffles

  • Approaches

    • The sausage machine

    • The “watchers”


Cifs shuffles2

CIFS Shuffles

  • Shuffle

    • Simple operations such as “does file A exist” need to read the cached instructions in the pipeline in addition to getting the state from the repo…

    • Data loss on crashing!

  • The sausage machine

  • CIFS Commands go into a pipeline and once we have a complete scenario we update the repo with a complete coarse grained transaction.


Cifs shuffles3

CIFS Shuffles

  • Shuffle

    • Scenarios compete

    • At the end of each command alfresco is in a known persistent state.

    • As and when scenarios fire they can “counter transact” previous behaviour.

  • The watchers

  • CIFS Commands go through a set of scenarios which say what to do. The highest priority scenario wins.

  • The scenarios contain their own state.

  • Many scenarios run at once


Cifs create shuffle6

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

File A


Cifs create shuffle7

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

File A

Temp File


Cifs create shuffle8

CIFS Create Shuffle

1.Copy Content

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Rename

    • Scenario Fires

File A

Temp File

3.Rename File A to Temp File

2.Rename temp file to Old File

Old File


Cifs create shuffle9

CIFS Create Shuffle

1.Copy Content

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Rename

    • Scenario Fires

    • Temp File

      moved into place

    • Existing file

      deleted

File A

Temp File

3.Rename File A

2.Rename temp file

Old File


Cifs create shuffle10

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Rename

    • Scenario Fires

    • Temp File

      moved into place

File A

Temp File

Old File


Cifs create shuffle11

CIFS Create Shuffle

  • CIFS Operations

    • File Exists

    • Create Temp File

    • Rename

    • Scenario Fires

    • Temp File

      moved into place

    • Old file deleted

File A

Old File


Architecture

Architecture

JLAN

Buffered Content Disk Driver

Non Transactional Disk Driver

Rule Evaluator

Filesystem Command Executor

Scenario

Content Disk Driver 2


Cifs shuffles4

CIFS Shuffles

  • Scenarios

    • Scenario Create

    • Scenario Rename

    • Scenario Create Delete Rename

    • Scenario Double Rename

    • Scenario Open File

    • Scenario Simple Non Buffered

    • And others …


Configuration

Configuration


Network protocol context xml

Network-protocol-context.xml

<property name="scenarios">

<list>

<!-- TextEdit Mac Lion -->

<bean id="tempDeleteShuffle" class="org.alfresco.filesys.repo.rules.ScenarioTempDeleteShuffle">

<property name="pattern"><value>^.*\.txt$</value></property>

<property name="tempDirPattern"><value>.*(\\\..*\\)+.*</value></property>

<property name="timeout"><value>60000</value></property>

<property name="ranking"><value>HIGH</value></property>

</bean>

<!-- Excel 2003 -->

<bean id="createShuffleExcel2003" class="org.alfresco.filesys.repo.rules.ScenarioCreateShuffle">

<property name="pattern"><value>[0-9A-F]{8}+$</value></property>

<property name="timeout"><value>60000</value></property>

<property name="ranking"><value>HIGH</value></property>

</bean>

<!-- Word 2003 -->

<bean id="createShuffle2003" class="org.alfresco.filesys.repo.rules.ScenarioCreateShuffle">

<property name="pattern"><value>~WRD.*.TMP</value></property>

<property name="timeout"><value>60000</value></property>

<property name="ranking"><value>HIGH</value></property>

</bean>


Scenario instance

Scenario Instance

/**

* A scenario is a factory for scenario instances.

*

*/

public interface Scenario

{

/**

* Create a new ScenarioInstance

* <p>

* If the scenario is interested in the specified operation then

* return a new scenario instance.

* @paramcurrentInstances the current instances of all scenarios.

* @param operation the operation to be performed

* @return the scenario instance or null if a new instance is not required.

*/

ScenarioInstancecreateInstance(EvaluatorContextctx, Operation operation);

}


Scenario

Scenario

/**

* A scenario instance is an active scenario. It has a ranking, an

* evaluate method and knows whether it is complete.

* <p>

* The evaluate method is called repeatedly as operations are processed.

*/

public interface ScenarioInstance

{

/**

* Get the Ranking

* @return

*/

public Ranking getRanking();

/**

* evaluate the scenario against the current operation

*

* @param operation

*/

public Command evaluate(Operation operation);

/**

* Is the scenario complete?

*

* @return

*/

public booleanisComplete();

}


Lunch

Lunch !


  • Login