Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sakai

...

Data

...

Storage

...

-

...

Campus

...

Installations

...

Existing

...

File

...

System

...

-

...

AFS

...

Currently,

...

UC

...

Davis

...

people

...

have

...

home

...

directories

...

in

...

AFS

...

space,

...

and

...

that

...

CourseManagement

...

also

...

utilizes

...

this

...

space.

...

  1. User's

...

  1. AFS

...

  1. Space

...

  1. Allocation

...


  1. User

...

  1. space

...

  1. in

...

  1. AFS

...

  1. is

...

  1. in

...

  1. the

...

  1. form

...

  1. of

...

  1. the

...

  1. directory

...

  1. stucture

...

  1. below:

...


  1. Ex.

...


  1. /afs/home.ucdavis.edu/home/sn/samerson

...


  1. Above,

...

  1. sn

...

  1. is

...

  1. the

...

  1. first

...

  1. initial

...

  1. of

...

  1. firstname,

...

  1. and

...

  1. last

...

  1. initial

...

  1. of

...

  1. lastname.

...

  1. Course

...

  1. AFS

...

  1. Space

...

  1. Allocation

...


  1. AFS

...

  1. space

...

  1. for

...

  1. courses

...

  1. is

...

  1. allocated

...

  1. via

...

  1. CRN,

...

  1. and

...

  1. CourseManagement

...

  1. in

...

  1. MyUCDavis

...

  1. writes

...

  1. data

...

  1. to

...

  1. this

...

  1. directory.

...

  1. The

...

  1. ACL

...

  1. is

...

  1. the

...

  1. MyUCDavis

...

  1. user.

...


  1. Ex.

...


  1. /afs/.ucdavis.edu/myucd/class/200603/ARE112001/

...


  1. Above

...

  1. uses

...

  1. TermCodeCRN,

...

  1. and

...

  1. class

...

  1. uniqueness

Problem Statement

Here are some of the questions we need to answer:

  1. How do we integrate Sakai's resources and our current AFS file system?
    Answer: via replacing ContentHostingService with our own implementation for AFS storage. The current ContentHostingService, backed by DbContentService provides minimal file storage capability
  2. When user's create worksites, how does this get mapped?
    Answer:
    For user worksites, those would resolve to their current afs home mapping scheme (e.g. home/sn/samerson)

...


  1. For

...

  1. other

...

  1. worksites,

...

  1. the

...

  1. /afs/

...

  1. root

...

  1. will

...

  1. be

...

  1. used

...

  1. as

...

  1. a

...

  1. starting

...

  1. point

...

  1. to

...

  1. store

...

  1. content.

...

  1. Project

...

  1. sites

...

  1. will

...

  1. have

...

  1. 2

...

  1. types

...

  1. (user

...

  1. project

...

  1. sites,

...

  1. and

...

  1. institutional

...

  1. project

...

  1. sites),

...

  1. and

...

  1. course

...

  1. sites

...

  1. will

...

  1. be

...

  1. stored

...

  1. via

...

  1. /TermCode/CRN/Sakai

...

  1. instance

...

  1. structure.

...

  1. See

...

  1. AFS

...

  1. File

...

  1. Mapping

...

  1. documentation

...

  1. for

...

  1. more

...

  1. details.

...

  1. What

...

  1. location

...

  1. does

...

  1. it

...

  1. get

...

  1. mapped?

...


  1. Answer:

...

  1. /afs/

...

  1. as

...

  1. root

...

  1. path

...

  1. for

...

  1. now,

...

  1. to

...

  1. be

...

  1. determined

...

  1. at

...

  1. a

...

  1. later

...

  1. point

...

  1. when

...

  1. to

...

  1. split

...

  1. this

...

  1. pathing

...

  1. up..

...

  1. Do

...

  1. course

...

  1. type

...

  1. of

...

  1. worksites

...

  1. get

...

  1. stored

...

  1. in

...

  1. existing

...

  1. AFS

...

  1. CourseManagement

...

  1. space?

...


  1. Answer:

...

  1. Yes,

...

  1. this

...

  1. will

...

  1. get

...

  1. saved

...

  1. in

...

  1. the

...

  1. existing

...

  1. AFS

...

  1. structure,

...

  1. however

...

  1. each

...

  1. instance

...

  1. of

...

  1. Sakai

...

  1. (e.g.

...

  1. SmartSite,

...

  1. CERE)

...

  1. will

...

  1. be

...

  1. able

...

  1. to

...

  1. write

...

  1. to

...

  1. the

...

  1. content

...

  1. appropriately.

...

  1. Where

...

  1. do

...

  1. project/research/

...

  1. or

...

  1. any

...

  1. other

...

  1. non-user

...

  1. and

...

  1. non-course

...

  1. Sakai

...

  1. sites

...

  1. get

...

  1. stored?

...


  1. Answer:

...

  1. under

...

  1. the

...

  1. /afs/

...

  1. root

...

  1. path,

...

  1. but

...

  1. we

...

  1. need

...

  1. to

...

  1. determine

...

  1. a

...

  1. volume

...

  1. and/or

...

  1. whether

...

  1. or

...

  1. not

...

  1. the

...

  1. site

...

  1. name

...

  1. resolves

...

  1. to

...

  1. anything

...

  1. meaningful

...

  1. over

...

  1. time.

...

  1. How Sakai stores content

    Current Sakai architecture supports storing course and user content both inside/outside of a database. The content path can be mapped to any given path one gives it in the sakai.properties configuration file:

ref: http://bugs.sakaiproject.org/confluence/display/FAQ/2.2.7.1+Configuration

...

The

...

content

...

below

...

is

...

taken

...

from

...

bugs.sakaiproject.org/confluence:

...

No Format
The best place for configuring this is the sakai.properties file.


# the file system root for content hosting's external stored files (default is null, i.e. store them in the db)
bodyPath@org.sakaiproject.service.legacy.content.ContentHostingService =${sakai.home}content


Enable the above line, and point at the root folder for the files to be stored.


# when storing content hosting's body bits in files, an optional set of folders just within the content.filesystem.root

# to act as volumes to distribute the files among - a comma separate list of folders.  If left out, no volumes will be used.
bodyVolumes@org.sakaiproject.service.legacy.content.ContentHostingService = v1,v2,v3


Enable the above line, and set the list of "volumes" for storage.  You can specify one or more volume names, comma separated on this line.  These are folders under the file system root.  Files will be distributed among these volumes.

If you are going to use multiple volume devices, you need to map them to these volume names that live "under" the root.  We have done this with our AFS file storage system at the University of Michigan.  If you are not using separate devices, then you can use any folder names for the volumes.  Provide at least one.

Files will be stored under each volume in a way so that there are not too many in any one folder.  The folder structure we use is:

{{YYYY/DDD/HH/id, where YYYY=year, DDD=day of year, HH=hour of day, and the 1111...=an id-based file name}}

for example,

{{2005/070/03/3223479379834-2343}}

or, using the above root and volumes, it might be:

{{/usr/local/tomcat/sakai/content/v2/2005/070/03/3223479379834-2343}}

Note that the resource name and type is not at all encoded here.  The date/time used to form the file name is the date/time of file creation.

{noformat}


h3. Proposed 

Proposed solution(s)

...

For

...

both

...

spaces,

...

use

...

the

...

ACL

...

associated

...

with

...

the

...

current

...

MyUCDavis

...

user,

...

however

...

make

...

the

...

reference

...

now

...

the

...

Sakai

...

user.

...

Use

...

the

...

same

...

IP's

...

registered

...

with

...

the

...

MyUCDavis

...

user

...

for

...

the

...

Sakai

...

user.

...

This

...

solution

...

should

...

be

...

targeted

...

for

...

Fall

...

Quarter

...

2006.

...

However,

...

in

...

the

...

meantime

...

a

...

proposed

...

solution

...

is

...

to

...

use

...

/afs/

...

as

...

the

...

root

...

path

...

for

...

file

...

content

...

storage

...

so

...

that

...

a

...

common

...

file

...

system

...

can

...

be

...

utilized.

...

Until

...

the

...

AFS

...

solution

...

can

...

be

...

fully

...

implemented,

...

we

...

are

...

to

...

utilize

...

this

...

strategy.

...

a.

...

user's

...

space

...


Create

...

a

...

.sakai

...

directory

...

within

...

the

...

user's

...

AFS

...

space

...

that

...

the

...

Sakai

...

user

...

account

...

has

...

access

...

to

...

write

...

to.

...

User's

...

will

...

not

...

be

...

allowed

...

to

...

browse

...

this

...

directory,

...

since

...

it

...

is

...

only

...

pertinent

...

to

...

Sakai.

...

b.

...

course

...

space

...


Utilize

...

University

...

of

...

Michigan's

...

current

...

mapping

...

(see

...

above

...

for

...

format

...

of

...

file

...

path)

...

of

...

course

...

content.

...

This

...

will

...

be

...

a

...

new

...

directory

...

structure

...

from

...

what

...

is

...

currently

...

being

...

used

...

for

...

MyUCDavis

...

CourseManagement.

...

c.

...

projects/research

...

space

...


Sakai

...

has

...

many

...

types

...

of

...

sites,

...

and

...

each

...

install

...

can

...

configure

...

these.

...

There

...

will

...

be

...

sites

...

related

...

to

...

projects

...

and

...

research

...

that

...

can

...

be

...

expected.

...

User's

...

space,

...

and

...

possibly

...

another

...

space

...

in

...

AFS,

...

will

...

be

...

utilized

...

for

...

these

...

types

...

of

...

sites.

...

Content

...

stored

...

in

...

user's

...

AFS

...

space

...

will

...

count

...

against

...

the

...

user's

...

AFS

...

quota,

...

specifically

...

the

...

user

...

who

...

owns

...

the

...

site.

...

Implementation details

The default registered service that handles content in Sakai is the DbContentService, which extends the BaseContentHostingService. A modification to the path generation in the DbContentService will allow the path to be configured for proper content storage in AFS. Creating a UCDavisContentService, which extends DbContentService, will enable custom configurations and "overrides" of methods which establish the file path used to store content. There are several considerations for this to be handled properly:

1. The site type must be determined, so the user's space may be used or that of CourseManagement.
This is currently working.

2. The user's quota should be checked prior to storage?
Needs to be implemented

3. The path must be customizable
Needs to be implemented

A preliminary UCDavisDbContentService file is provided, which will replace the DbContentService as the registered service for storing content. This is a Sakai 2.1 example.

Implementation Algorithm In Summary

*Note: The algorithm below refers to file writes into AFS, from Sakai. File read process involves a separate process of reading file paths from the Sakai internal database, and trying to access this file in AFS. Currently, standard Sakai error handling will apply to file read errors.

  1. Determine bodypath for file storage, from ContentHostingService
    • Determine if bodypath exists via ContentHostingService. If exists, try to
    • Find site type from a Sakai reference object (that ContentHostingService uses) if site type is:
    1. User Sites
      • Determine userid
      • From userid, determine user AFS home root from firstname, lastname algorithm. This is AFS HOME ROOT
      • Create bodypath as /afs/home.ucdavis.edu/home/

...

      • AFS

...

      • HOME

...

      • ROOT

...

      • /.sakai/

...

      • INSTANCE
    1. Personal Project Sites
    2. Course Sites
    3. Other Site Types (e.g.

...

    1. Institutional

...

    1. Project

...

    1. Sites)

...

    • else if bodypath doesn't

...

    • exist..

...

Things to consider

  1. There will be a need (tool?)

...

  1. to

...

  1. display

...

  1. how

...

  1. much

...

  1. user's

...

  1. space

...

  1. is

...

  1. taken

...

  1. by

...

  1. Sakai,

...

  1. etc.

...

  1. This

...

  1. will

...

  1. reduce

...

  1. the

...

  1. amount

...

  1. of

...

  1. support

...

  1. calls,

...

  1. and

...

  1. be

...

  1. consistent

...

  1. with

...

  1. the

...

  1. current

...

  1. CourseManagement

...

  1. tools

...

  1. available

...

  1. for

...

  1. MySpace.

...

  1. The

...

  1. path

...

  1. for

...

  1. storing

...

  1. content

...

  1. should

...

  1. be

...

  1. highly

...

  1. configurable

...

  1. via

...

  1. properties,

...

  1. or

...

  1. other

...

  1. variables.

...