SlideShare a Scribd company logo
1 of 22
Download to read offline
DivConq	
  Demo	
  
Version 0.9.4 of DivConq MFT is a “concept” release to highlight some of the
plans we have. Not all the concepts are fully developed or fully tested, this is Beta
quality, as will be all 0.9.N releases.
With 0.9.4 comes:
•  File Task (script) triggered on successful upload
•  File Task (script) scheduler
•  File Task (script) triggered by file system events (Windows, Linux and OS X)
At the heart is dcScript, the scripting language of DivConq.
It is the “glue” that brings various file (and related) operations together to support
a specific business goal.
It is not optimized for scientific number crunching, but is fast enough for file
transfer tasks.
Scripts are meant to be small, calling supporting Java classes. Java does the
work, Scripts declare the intent behind the work.
XML is an ideal grammar for declaring intent, dcScripts are written in XML.
dcScript is designed so that each instruction may be executed asynchronously.
This is essential to DivConq because our threading model is optimized around all
operations being async. Fortunately dcScript takes the complexity out of async
programming, see next slide...
What does it mean that dcScript takes the complexity out of async programming?
Review this example:
<dcScript>	
  
<Main>	
  
	
  <Console>Before	
  Sleep</Console>	
  
	
  	
  
	
  <Sleep	
  Seconds="3"	
  />	
  
	
  	
  
	
  <Console>After	
  Sleep</Console>	
  
</Main>	
  
</dcScript>	
  
The Sleep instruction, like many other instructions in dcScript, supports async
operations. So when this code is run the “Before” message appears and three
seconds later the “After” message appears. However, the thread does not
block, rather it does other work while the script does nothing for three seconds.
There is no need for a Callback, a Future or an Await, dcScript picks up right after
sleep automatically as if this were sync code – but it is not.
dcScript benefits DivConq by complementing our threading model. How does it
benefit you?
Number one reason is it puts complex file operations at your finger tips. For
example, lets say you have a file operation requirement:
•  Starting with a folder of files in /Work/Temp/Source/karabiner
•  You need to tar those files into a tar ball
•  Then gzip the tar ball
•  Then PGP Encrypt the gzip tar ball
•  Then split that encrypted file into 512MB chunks, named karabiner_N.tgz.gpg
where N is the number sequence and then store those split files in /Work/
Temp/Dest/karabiner
This is it. Source and Dest folder. Then a list of operations, which automatically
form a chain – Tar, Gzip, PGPEncrypt, Split.
<dcScript>	
  
<Main>	
  
	
  	
  	
  	
  <LocalFolder	
  Name="fh0"	
  Path="/Work/Temp/Source/karabiner"	
  />	
  
	
  	
  	
  	
  <LocalFolder	
  Name="fh2"	
  Path="/Work/Temp/Dest/karabiner"	
  />	
  
	
  	
  
	
  	
  	
  	
  <FileOps>	
  
	
  <Tar	
  Source="$fh0"	
  />	
  
	
  <Gzip	
  />	
  
	
  <PGPEncrypt	
  Keyring="/Work/Keys/pubring.gpg"	
  />	
  
	
  <Split	
  Dest="$fh2"	
  Size="512MB"	
  Template="karabiner_%seq%.tgz.gpg"	
  />	
  
	
  	
  	
  	
  </FileOps>	
  
</Main>	
  
</dcScript>	
  
Not only is this easy to write and easy to understand, these operations have all
been optimized for you. How? Through in-memory streaming…
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
Typically these operations would require 4 separate reads and writes to disk,
disk (even SSD) however is very slow compared to memory. This is particularly
true when attempting to scale your server. What if you had 4 threads
processing files? Then you’d need to read/write 16 files. Overall performance
goes down. With streaming you reduce the disk access considerably saving
your server I/O for use with scaling. And maybe reducing IaaS costs too, when
using a service such as Amazon EC2 – I/O Ops can be expensive.
Read Disk
Write Disk
In-Memory
Transformations
Sources
Local	
  
Copy	
  
Local	
  
DestinationsOperation
How does Copy normally work in Java? Your code (blue) reads a single buffer of
data from the disk – probably around 32KB. Then the code writes the buffer to
the new file on disk. This loop is repeated until there is no more data to read.
DivConq streaming expands on this principle.
Read Disk
Write Disk
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
DivConq Streams only start when you supply a Destination. Op4 is the target of
the Destination, so work begins at Op4.
Start Stream with Dest
Request for Content
Bubbles up Stream
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
The file is read just a any normal file read would in Java.
Call
Read
File
Buffer
Returned
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
Buffer Transformed and Relayed by each Op
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
The buffer is written to a file after the final transformation.
Write Disk
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
Op 4 requests more content. Repeat until Op 1 reaches end of source file.
Request for Content
Bubbles up Stream
Transformations sometimes require more data than a single buffer may hold. In
these cases the Op may issue a request for content up stream before sending
the transformed buffer down stream. Any Op may issue any number of upstream
requests before passing data downstream.
Any Op may issue any number of async commands before pulling from up
stream or pushing to down stream. Yet the stream starts right where it left off
after the async request returns.
Data sources may be read or written with async operations, without interrupting
the stream’s normal operation.
Streams are stack safe – you will not experience Stack Overflow using DivConq
streams.
Streams are automatically throttled, no single stream will overload your CPU.
Streams are fast, only slightly slower than a normal Java file copy.
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
In memory, not Temp files, when
possible.
SFTP	
  
S3	
  
HDFS	
  
Web	
  
DAV	
  
SFTP	
  
S3	
  
HDFS	
  
Web	
  
DAV	
  
SMB	
   SMB	
  
In the future DivConq will
support many protocols for
source and destination.
Sources
Local	
  
Op	
  1	
   Op	
  2	
   Op	
  3	
   Op	
  4	
  
Local	
  
DestinationsOperations (Tar, Gzip, PGP, etc)
In memory, not Temp files, when
possible.
SFTP	
  
S3	
  
HDFS	
  
Web	
  
DAV	
  
SFTP	
  
S3	
  
HDFS	
  
Web	
  
DAV	
  
SMB	
   SMB	
  
Mix and match source and
destination – for example pull from
SFTP and write to S3.
No need to write to local disk at all.
Streaming is a powerful feature. dcScript makes it easy to use this feature as
well as other File Task operations such a file selection, file filtering and file
ordering. And of course it will support the basics such as moving files, deleting
files, renaming files, transforming file formats, manipulating zip files, joining files,
hashing files, and verifying OpenPGP signatures.
dcScript will offer significant support for reading and writing text files (line by line)
right in script. We will also add support for other common formats such as XML,
JSON, Excel and CSV.
We will continue to optimize dcScript’s operations so that you get the best
possible performance without worrying about tuning. dcScript brings worry free:
•  Threading
•  Streaming
•  Optimizations
dcScript offers a full set of scripting instructions:
•  For, While, Until Loops
•  If/Else Conditions
•  Select/Case
•  Function Calls
•  Function Libraries
However, this does not mean that dcScript should be used to write big programs. It
is a glue language and designed for simplicity. You will be able to (future) create
extensions to dcScript in Java or Groovy – use these extensions to do heavy work
and use dcScript to glue the pieces together.
Also note that the following introduction is not intended to teach computer
programming. You should already have experience with JavaScript or similar
language and be familiar with variables, for loops, as well as if and else conditions.
Many feature of dcScript are ready for you to try. Be sure to get the DivConq 0.9.4
demo release: https://github.com/Gadreel/divconq/wiki/Getting Started
Running the dcScript demos is best done with a GUI so please do this in an OS
with a GUI environment such as Windows, OS X or a GUI Linux desktop…not in
headless Amazon Linux (or similar)
You may try dcScript within either dcFileServer or dcFileTasks. Run your server in
Foreground mode as detailed in the instructions. Select option 100 (“dcScript GUI
Debugger”).
In the GUI window that appears select File and Open. Navigate to “packages/
dcTest/dcs/examples/01-variables.dcs.xml”.
You now have a script that looks like this only with more comments in it.
<dcScript	
  Title="Variable	
  Basics">	
  
<Main>	
  
	
  <Var	
  Name="bottles"	
  Type="Integer"	
  SetTo="99"	
  />	
  
	
  
	
  <Console>bottles	
  =	
  {$bottles}</Console>	
  
	
  
	
  <With	
  Target="$bottles">	
  
	
   	
  <Inc	
  />	
  
	
  </With>	
  
	
  	
  
	
  <Console>$bottles</Console>	
  
	
  	
  
	
  ...	
  
Use the double arrow button (first button) to the right to step into the script. Step
until you get to the first Console instruction. Notice that the line of the script you
are about to execute is highlighted. Select <Main> in the box labeled Stack. Note
now that you can see the values for all the variables in the Main scope. Step
some more and as you do notice the values change for the variables.
There are 10 example scripts available for you to learn the basics of dcScript. Use
the GUI debugger and read the comments to learn our scripting engine.
Follow the instructions for the dcFileTasks demo (Test Tasks) at:
https://github.com/Gadreel/divconq/wiki/Getting-Started-Config#config-for-tasks to
see scripts integrated into the server’s features. Review also the scripts at
packages/dcTest/dcs/test/06-scheduler.dcs.xml and packages/dcTest/dcs/test/07-
watch-file.dcs.xml
Try creating your own script that runs on a schedule or when a file is modified.
See notes in the wiki link above about where to add your scripts.
<LocalFolder	
  Name="fs1"	
  Path="c:/temp/test"	
  />	
  
<LocalFolder	
  Name="fs3"	
  Path="c:/temp/testtar"	
  />	
  
	
  	
  
<FileOps>	
  
	
  <Tar	
  Source="$fs1"	
  NameHint="test-­‐files-­‐ball"	
  />	
  
	
  <Gzip	
  Dest="$fs3"	
  />	
  
<FileOps>	
  
	
  
Give streams a try with something like the above – take a source folder and Tar
and the Gzip it to a new destination.
Reverse it with Ungzip and Untar operations.
Try an encrypt like this file op:
<PGPEncrypt	
  Source="$fh0"	
  Dest="$fh1"	
  Keyring="/Users/Owner/.gnupg/pubring.gpg"	
  />	
  
And maybe try a Tar and an PGPEncrypt. PGPDecrypt is not supported yet, but
there is still enough to play with. dcScript and DivConq are off to a promising
start.

More Related Content

What's hot

Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)
Michael Lamont
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
Jesse Vincent
 

What's hot (20)

Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
JRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing WorldJRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing World
 
Serialization in Go
Serialization in GoSerialization in Go
Serialization in Go
 
Fluentd meetup at Slideshare
Fluentd meetup at SlideshareFluentd meetup at Slideshare
Fluentd meetup at Slideshare
 
Avro
AvroAvro
Avro
 
Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)Installing & Configuring OpenLDAP (Hands On Lab)
Installing & Configuring OpenLDAP (Hands On Lab)
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in details
 
Building reliable systems with Apache BookKeeper
Building reliable systems with Apache BookKeeperBuilding reliable systems with Apache BookKeeper
Building reliable systems with Apache BookKeeper
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
An Introduction To Docker
An Introduction To  DockerAn Introduction To  Docker
An Introduction To Docker
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Fluentd v1 and future at techtalk
Fluentd v1 and future at techtalkFluentd v1 and future at techtalk
Fluentd v1 and future at techtalk
 
The architecture of oak
The architecture of oakThe architecture of oak
The architecture of oak
 
Packaging for the Maemo Platform
Packaging for the Maemo PlatformPackaging for the Maemo Platform
Packaging for the Maemo Platform
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
Fluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect MoreFluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect More
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
Cassandra via-docker
Cassandra via-dockerCassandra via-docker
Cassandra via-docker
 

Similar to Demo 0.9.4

[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic
Perforce
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
wensheng wei
 

Similar to Demo 0.9.4 (20)

Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2 Introduction to Apache Spark :: Lagos Scala Meetup session 2
Introduction to Apache Spark :: Lagos Scala Meetup session 2
 
Spark Summit EU 2015: Lessons from 300+ production users
Spark Summit EU 2015: Lessons from 300+ production usersSpark Summit EU 2015: Lessons from 300+ production users
Spark Summit EU 2015: Lessons from 300+ production users
 
[AWS Builders] Effective AWS Glue
[AWS Builders] Effective AWS Glue[AWS Builders] Effective AWS Glue
[AWS Builders] Effective AWS Glue
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark Tutorial
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
14th Athens Big Data Meetup - Landoop Workshop - Apache Kafka Entering The St...
14th Athens Big Data Meetup - Landoop Workshop - Apache Kafka Entering The St...14th Athens Big Data Meetup - Landoop Workshop - Apache Kafka Entering The St...
14th Athens Big Data Meetup - Landoop Workshop - Apache Kafka Entering The St...
 
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveApache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
 
Lower bandwidth consumption and less waiting with Dropbox Business
Lower bandwidth consumption and less waiting with Dropbox BusinessLower bandwidth consumption and less waiting with Dropbox Business
Lower bandwidth consumption and less waiting with Dropbox Business
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
Ccd
CcdCcd
Ccd
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Testing Delphix: easy data virtualization
Testing Delphix: easy data virtualizationTesting Delphix: easy data virtualization
Testing Delphix: easy data virtualization
 
[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
 
Apache Cassandra and Apche Spark
Apache Cassandra and Apche SparkApache Cassandra and Apche Spark
Apache Cassandra and Apche Spark
 
IBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark BasicsIBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark Basics
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 

Demo 0.9.4

  • 2. Version 0.9.4 of DivConq MFT is a “concept” release to highlight some of the plans we have. Not all the concepts are fully developed or fully tested, this is Beta quality, as will be all 0.9.N releases. With 0.9.4 comes: •  File Task (script) triggered on successful upload •  File Task (script) scheduler •  File Task (script) triggered by file system events (Windows, Linux and OS X) At the heart is dcScript, the scripting language of DivConq.
  • 3. It is the “glue” that brings various file (and related) operations together to support a specific business goal. It is not optimized for scientific number crunching, but is fast enough for file transfer tasks. Scripts are meant to be small, calling supporting Java classes. Java does the work, Scripts declare the intent behind the work. XML is an ideal grammar for declaring intent, dcScripts are written in XML. dcScript is designed so that each instruction may be executed asynchronously. This is essential to DivConq because our threading model is optimized around all operations being async. Fortunately dcScript takes the complexity out of async programming, see next slide...
  • 4. What does it mean that dcScript takes the complexity out of async programming? Review this example: <dcScript>   <Main>    <Console>Before  Sleep</Console>        <Sleep  Seconds="3"  />        <Console>After  Sleep</Console>   </Main>   </dcScript>   The Sleep instruction, like many other instructions in dcScript, supports async operations. So when this code is run the “Before” message appears and three seconds later the “After” message appears. However, the thread does not block, rather it does other work while the script does nothing for three seconds. There is no need for a Callback, a Future or an Await, dcScript picks up right after sleep automatically as if this were sync code – but it is not.
  • 5. dcScript benefits DivConq by complementing our threading model. How does it benefit you? Number one reason is it puts complex file operations at your finger tips. For example, lets say you have a file operation requirement: •  Starting with a folder of files in /Work/Temp/Source/karabiner •  You need to tar those files into a tar ball •  Then gzip the tar ball •  Then PGP Encrypt the gzip tar ball •  Then split that encrypted file into 512MB chunks, named karabiner_N.tgz.gpg where N is the number sequence and then store those split files in /Work/ Temp/Dest/karabiner
  • 6. This is it. Source and Dest folder. Then a list of operations, which automatically form a chain – Tar, Gzip, PGPEncrypt, Split. <dcScript>   <Main>          <LocalFolder  Name="fh0"  Path="/Work/Temp/Source/karabiner"  />          <LocalFolder  Name="fh2"  Path="/Work/Temp/Dest/karabiner"  />              <FileOps>    <Tar  Source="$fh0"  />    <Gzip  />    <PGPEncrypt  Keyring="/Work/Keys/pubring.gpg"  />    <Split  Dest="$fh2"  Size="512MB"  Template="karabiner_%seq%.tgz.gpg"  />          </FileOps>   </Main>   </dcScript>   Not only is this easy to write and easy to understand, these operations have all been optimized for you. How? Through in-memory streaming…
  • 7. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) Typically these operations would require 4 separate reads and writes to disk, disk (even SSD) however is very slow compared to memory. This is particularly true when attempting to scale your server. What if you had 4 threads processing files? Then you’d need to read/write 16 files. Overall performance goes down. With streaming you reduce the disk access considerably saving your server I/O for use with scaling. And maybe reducing IaaS costs too, when using a service such as Amazon EC2 – I/O Ops can be expensive. Read Disk Write Disk In-Memory Transformations
  • 8. Sources Local   Copy   Local   DestinationsOperation How does Copy normally work in Java? Your code (blue) reads a single buffer of data from the disk – probably around 32KB. Then the code writes the buffer to the new file on disk. This loop is repeated until there is no more data to read. DivConq streaming expands on this principle. Read Disk Write Disk
  • 9. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) DivConq Streams only start when you supply a Destination. Op4 is the target of the Destination, so work begins at Op4. Start Stream with Dest Request for Content Bubbles up Stream
  • 10. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) The file is read just a any normal file read would in Java. Call Read File Buffer Returned
  • 11. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) Buffer Transformed and Relayed by each Op
  • 12. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) The buffer is written to a file after the final transformation. Write Disk
  • 13. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) Op 4 requests more content. Repeat until Op 1 reaches end of source file. Request for Content Bubbles up Stream
  • 14. Transformations sometimes require more data than a single buffer may hold. In these cases the Op may issue a request for content up stream before sending the transformed buffer down stream. Any Op may issue any number of upstream requests before passing data downstream. Any Op may issue any number of async commands before pulling from up stream or pushing to down stream. Yet the stream starts right where it left off after the async request returns. Data sources may be read or written with async operations, without interrupting the stream’s normal operation. Streams are stack safe – you will not experience Stack Overflow using DivConq streams. Streams are automatically throttled, no single stream will overload your CPU. Streams are fast, only slightly slower than a normal Java file copy.
  • 15. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) In memory, not Temp files, when possible. SFTP   S3   HDFS   Web   DAV   SFTP   S3   HDFS   Web   DAV   SMB   SMB   In the future DivConq will support many protocols for source and destination.
  • 16. Sources Local   Op  1   Op  2   Op  3   Op  4   Local   DestinationsOperations (Tar, Gzip, PGP, etc) In memory, not Temp files, when possible. SFTP   S3   HDFS   Web   DAV   SFTP   S3   HDFS   Web   DAV   SMB   SMB   Mix and match source and destination – for example pull from SFTP and write to S3. No need to write to local disk at all.
  • 17. Streaming is a powerful feature. dcScript makes it easy to use this feature as well as other File Task operations such a file selection, file filtering and file ordering. And of course it will support the basics such as moving files, deleting files, renaming files, transforming file formats, manipulating zip files, joining files, hashing files, and verifying OpenPGP signatures. dcScript will offer significant support for reading and writing text files (line by line) right in script. We will also add support for other common formats such as XML, JSON, Excel and CSV. We will continue to optimize dcScript’s operations so that you get the best possible performance without worrying about tuning. dcScript brings worry free: •  Threading •  Streaming •  Optimizations
  • 18. dcScript offers a full set of scripting instructions: •  For, While, Until Loops •  If/Else Conditions •  Select/Case •  Function Calls •  Function Libraries However, this does not mean that dcScript should be used to write big programs. It is a glue language and designed for simplicity. You will be able to (future) create extensions to dcScript in Java or Groovy – use these extensions to do heavy work and use dcScript to glue the pieces together. Also note that the following introduction is not intended to teach computer programming. You should already have experience with JavaScript or similar language and be familiar with variables, for loops, as well as if and else conditions.
  • 19. Many feature of dcScript are ready for you to try. Be sure to get the DivConq 0.9.4 demo release: https://github.com/Gadreel/divconq/wiki/Getting Started Running the dcScript demos is best done with a GUI so please do this in an OS with a GUI environment such as Windows, OS X or a GUI Linux desktop…not in headless Amazon Linux (or similar) You may try dcScript within either dcFileServer or dcFileTasks. Run your server in Foreground mode as detailed in the instructions. Select option 100 (“dcScript GUI Debugger”). In the GUI window that appears select File and Open. Navigate to “packages/ dcTest/dcs/examples/01-variables.dcs.xml”.
  • 20. You now have a script that looks like this only with more comments in it. <dcScript  Title="Variable  Basics">   <Main>    <Var  Name="bottles"  Type="Integer"  SetTo="99"  />      <Console>bottles  =  {$bottles}</Console>      <With  Target="$bottles">      <Inc  />    </With>        <Console>$bottles</Console>        ...   Use the double arrow button (first button) to the right to step into the script. Step until you get to the first Console instruction. Notice that the line of the script you are about to execute is highlighted. Select <Main> in the box labeled Stack. Note now that you can see the values for all the variables in the Main scope. Step some more and as you do notice the values change for the variables.
  • 21. There are 10 example scripts available for you to learn the basics of dcScript. Use the GUI debugger and read the comments to learn our scripting engine. Follow the instructions for the dcFileTasks demo (Test Tasks) at: https://github.com/Gadreel/divconq/wiki/Getting-Started-Config#config-for-tasks to see scripts integrated into the server’s features. Review also the scripts at packages/dcTest/dcs/test/06-scheduler.dcs.xml and packages/dcTest/dcs/test/07- watch-file.dcs.xml Try creating your own script that runs on a schedule or when a file is modified. See notes in the wiki link above about where to add your scripts.
  • 22. <LocalFolder  Name="fs1"  Path="c:/temp/test"  />   <LocalFolder  Name="fs3"  Path="c:/temp/testtar"  />       <FileOps>    <Tar  Source="$fs1"  NameHint="test-­‐files-­‐ball"  />    <Gzip  Dest="$fs3"  />   <FileOps>     Give streams a try with something like the above – take a source folder and Tar and the Gzip it to a new destination. Reverse it with Ungzip and Untar operations. Try an encrypt like this file op: <PGPEncrypt  Source="$fh0"  Dest="$fh1"  Keyring="/Users/Owner/.gnupg/pubring.gpg"  />   And maybe try a Tar and an PGPEncrypt. PGPDecrypt is not supported yet, but there is still enough to play with. dcScript and DivConq are off to a promising start.