WEBVTT

00:00.000 --> 00:30.000
I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry

00:30.000 --> 01:00.000
I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry, I'm sorry

01:00.000 --> 01:05.840
next systems. Sorry my voice is a bit down, but I'll try to speak as loudly as possible.

01:05.840 --> 01:13.680
So please bear with me. And now without further ado, let's get started. Cool. So who am I?

01:13.680 --> 01:19.520
Well, I am a Christian Kapoor. You can call me AK because that's apparently easier to pronounce.

01:19.520 --> 01:25.120
I am a fourth year, data science and graduate at IIT Monday India. For the past seven

01:25.120 --> 01:30.240
eight months, I have been working as an exchange student at Ubranshwai and to you

01:30.240 --> 01:36.720
President in Germany. I have contributed two times to the Google Summer of Code Program in 2023

01:36.720 --> 01:42.720
and 2024 as a participant under Linux foundation contributing to open printing.

01:42.720 --> 01:47.200
Fun fact, I have one of my mentors here, Tilt Campeter, a huge shout out to him.

01:48.160 --> 01:57.040
Very good. I am also being a speaker at the Ubranshwai 2023 and 2024 and I'm currently

01:57.040 --> 02:02.240
interning at FITEC where I'm developing an AI-based system for information management system,

02:02.240 --> 02:07.040
content management systems, basically sort of a retry will augmented generation pipeline or

02:07.040 --> 02:13.600
act pipeline. But yes, now without further ado, let's get started. So what exactly is

02:13.680 --> 02:19.440
Apple? Well, Apple is a printer application framework. It's basically a C-based framework.

02:19.440 --> 02:24.720
It's a library that allows you to build cups printer applications, cups as in common

02:24.720 --> 02:29.840
unix printing systems. It is a recommended replacement for your traditional

02:29.840 --> 02:36.880
printer drivers. It is a complete plug-and-place system. It allows you to basically has its own

02:36.880 --> 02:43.440
HTTP IPP everywhere server built-in that allows you to go ahead and connect to any possible

02:43.440 --> 02:48.320
printer service in the world. It allows for multiple platforms support as well. It works with

02:48.320 --> 02:54.080
desktop, submitted servers, embedded environments. It is also adaptable to raster graphics,

02:54.080 --> 03:00.240
raster drivers as well. It sort of simplifies your entire printer application development.

03:00.880 --> 03:08.080
Cool. Moving ahead. Before I move on to start talking about scanning in general, how scanning

03:08.080 --> 03:12.880
is getting included into the printer application framework, let's talk a little bit about the

03:12.880 --> 03:20.320
API behind Apple. Well, the API is essentially divided into five main components. The first one

03:20.320 --> 03:26.160
being system, clients, devices, printers, and jobs as can be seen on the block diagram as well.

03:26.160 --> 03:31.920
The system is basically the object that is responsible for managing the entire programming

03:31.920 --> 03:38.640
application framework here. It is sort of the main parent object that we have and it is responsible

03:38.640 --> 03:42.720
for controlling the social listeners and basically logging everything that is out there.

03:44.080 --> 03:48.000
As you can see in the block diagram as well, the system of the task has a parent object to

03:48.000 --> 03:54.080
clients, devices, and printers. Clients talking about client client is another type of object that

03:54.080 --> 04:01.440
helps manage all the client-based operations. Think about any HTTP or IPP get post, post, any type

04:01.440 --> 04:06.080
of request that you can think of. Those are handled by the client object. The device's object

04:06.080 --> 04:10.880
is basically the one that is handling connection with the actual physical printer or the actual

04:10.880 --> 04:15.440
physical scanner. That's the devices object and the printers is basically a virtual object that

04:15.440 --> 04:21.280
allows us that is basically also a parent to the jobs, which manages all the printing jobs,

04:21.280 --> 04:26.480
the queuing of jobs, you know, different printing settings, different everything else. So that is how

04:26.480 --> 04:32.080
it's all, that is a broad overview of the application programming interface of Apple.

04:32.880 --> 04:39.840
Cool. So, I told you about Apple, what Apple is, I told you about the API, but where does

04:39.840 --> 04:44.240
developers role come in? So, what will you have to do as a developer if you want to get started

04:44.240 --> 04:49.360
in Apple? Well, essentially what you will have to do is you will need to be sort of, you

04:49.360 --> 04:54.960
need to sort of write a printer driver. You provide you a complete application programming interface,

04:54.960 --> 05:00.000
a complete library, all that you have to do is sort of refactor your code into some functions,

05:00.000 --> 05:05.040
which are called as callback functions. And then boom, you will have everything working. So, essentially

05:05.040 --> 05:10.640
it's a minimal effort and a maximum efficiency protocol setup. Apple entirely handles all the heavy

05:10.640 --> 05:15.200
lifting for you. So, you have the printer driver code setup, you take the printer driver,

05:15.200 --> 05:19.440
code factor it into a bunch of different callback functions, which are essentially behind the

05:19.440 --> 05:25.200
loop of actually communicating with the printer and Apple handles the request, it handles the

05:25.280 --> 05:31.280
server for you, it handles concurrency, it handles everything related to printing. So, this was

05:31.280 --> 05:36.000
a complete overview of what Apple is, how you will start developing with Apple, what is the

05:36.000 --> 05:42.240
API's Apple? Now, coming on to the main title of the topic, which is the scanning works and

05:42.240 --> 05:48.080
the unified scanning systems in Linux. Well, it starts with same going insane. Now, what is

05:48.160 --> 05:54.160
sane, you might think sane is basically scanner access now easy. It's basically the standard

05:54.160 --> 06:01.120
platform for scanning on Linux and Linux. Essentially what sane provides like what it tries to

06:01.120 --> 06:05.680
provide you is that you will have a front end setup and a back end setup. The front end application

06:05.680 --> 06:12.480
for example, I mentioned a couple of them, simple scan and XK, XXN, they look for back end

06:12.560 --> 06:18.560
drivers, those back end drivers are essentially dynamically loaded libraries and each of those

06:18.560 --> 06:23.760
back end run and support a particular set of scanners. So, what happens during runtime, the front end

06:23.760 --> 06:29.760
tries to contact the back end back end drivers, the back end drivers then sort of contact the scanners

06:29.760 --> 06:37.040
and this is how the entire process is set up. Now, the problem with this setup is essentially that

06:37.120 --> 06:42.880
if you have X number of front ends and Y number of back ends, you will have X into Y total number

06:42.880 --> 06:47.120
of permutations and combinations for this. Because for each front end, you will have to correlate

06:47.120 --> 06:52.000
with a particular back end and you will sort of have to interface. So, that's where sort of

06:52.000 --> 07:00.480
Apple tries to come in and excuse me, Apple tries to come in and sort of give the solution for it.

07:00.480 --> 07:06.640
So, the problem as I already mentioned is let's suppose a particular driver back end has been packaged

07:06.720 --> 07:13.120
into a sandbox application, that sandbox application trying as in a flat back or a snap-based application.

07:13.120 --> 07:19.120
It sort of isolates the back end from that and since the back end has been completely isolated,

07:19.120 --> 07:24.640
the front end does not have any means of loading all the dynamically shared libraries that are

07:24.640 --> 07:30.240
available. So, let's suppose a particular back end has been fixated to a particular SNAP number 1,

07:30.240 --> 07:35.360
then a SNAP number 2. So, front end will have to manually contacts SNAP number 1 and then SNAP number

07:35.920 --> 07:40.160
2. So, each driver being sandbox does not, you know, it is not an optimal solution.

07:40.160 --> 07:45.040
So, it breaks the traditional same architecture and hence the name same going and same.

07:48.240 --> 07:53.440
Cool. So, what is this solution for this? Well, obviously integrating, we talked about

07:53.440 --> 07:59.440
printer applications going, you know, driverless, how about we integrate that scanning architecture

07:59.440 --> 08:04.320
into the printer framework that we have. So, obviously we need to have a proper standard,

08:04.400 --> 08:10.240
that standard that we have is called ESCL. It is provided by organization called MO Priya.

08:10.240 --> 08:16.080
So, MO Priya is the one that provides the ESCL standard. We have settled on the ESCL standard

08:16.080 --> 08:21.600
and what that allows us to do is sort of merge the driverless functionality of different

08:21.600 --> 08:26.880
back ends into one single architecture on the platform. So, you have a multi-function device for

08:26.880 --> 08:30.880
a printer or a scanner, you can easily go ahead and create applications using that.

08:31.520 --> 08:37.440
Uh, it sort of replaces the same interface that was initially there. So, instead of having X

08:37.440 --> 08:42.560
into Y number of permutations, you will now have X plus Y number of permutations out there.

08:42.560 --> 08:46.000
So, that essentially is more optimal as compared to the initial architecture.

08:49.200 --> 08:54.240
So, how do we go about that? Well, I initially talked about Apple, the API overview of Apple.

08:55.280 --> 09:00.400
We already have system clients, devices, printers and jobs. So, we will lead to embed

09:00.480 --> 09:06.320
somewhere, a scanner, object inside this API overview. So, we have printers, we go ahead and

09:06.320 --> 09:12.080
add scanners. We will also have to figure out how to align the ESCL functionality with the

09:13.360 --> 09:19.440
API functionality that is already available. So, creating a scanning API from scratch up to the

09:19.440 --> 09:22.800
papel level will be the final issue that we are going to try to solve here.

09:22.880 --> 09:28.880
Uh, give me a second, I will have some water my throat is down.

09:36.320 --> 09:43.360
Yes. So, now talking back about the MO Priya specs that we have, what these scanning specifications

09:43.360 --> 09:48.480
allow you to do is they define a proper interface, how you will be able to perform scanning.

09:48.560 --> 09:53.600
So, think about like somewhere else in the world thought about this, they thought about creating

09:53.600 --> 09:57.840
an independent sort of solution related to scanning. We come in and the open printing,

09:57.840 --> 10:01.840
we were already doing so for printing, how about we go ahead and merge these two together.

10:01.840 --> 10:06.880
So, we already had a standard for it. The standard was MO Priya's scanning specifications.

10:06.880 --> 10:13.120
It provides sort of a restful API interface and that restful API interface sort of allows you to

10:13.120 --> 10:16.960
communicate between different scanning services that are available in the cloud, either on

10:16.960 --> 10:22.720
device or, you know, on cloud as well. The network device, coming that goes on the protocol that

10:22.720 --> 10:29.920
has followed is MDNS, multicars GNS and DNS as G protocol. We have the scanning being registered

10:29.920 --> 10:36.800
under U scan TCP and U scan TCP. So, these are advertised via TXT records and passed as XML files.

10:37.600 --> 10:42.480
The scan job management is also very easy because we have a couple of different functions

10:42.480 --> 10:46.960
under scan of capabilities, scan of jobs, scan of supplies. These are essentially used

10:46.960 --> 10:51.120
for tracking and you know storing of job requests and anything related to scanning process.

10:52.800 --> 10:57.440
Anything else like different types of scanners, flatbed, plethora, all these types of

10:57.440 --> 11:00.640
scanners are then essentially provided under the MO Priya specifications.

11:04.480 --> 11:10.400
Cool. How about the testing pipeline? Well, the testing pipeline that we have here

11:10.480 --> 11:16.480
has to be divided into two parts. The first part is essentially we have a dummy scanner.

11:16.480 --> 11:21.840
The dummy scanner is essentially a library wherein we have different, you know, we are basically

11:21.840 --> 11:28.400
emulating a scanner where wherein we have everything that a scanner can return as a text file.

11:28.400 --> 11:34.080
So, the text file, all that we have to do is read the text file, stole the store the information

11:34.080 --> 11:39.680
into a particular data structure and internal data structure and we can therefore mimic a real

11:39.680 --> 11:44.560
scanner behavior without actually needing the real hardware. So, that's a successful execution.

11:44.560 --> 11:50.080
And in the end, if everything works out, if all the flats are checked, all that we have to do is go ahead

11:50.080 --> 11:55.120
and return a simple scanned dummy image so that we know that the software is working. It's simple

11:55.120 --> 11:59.200
file that allows you to execute and test the flow of the entire scanning architecture.

12:01.840 --> 12:07.520
But how about the actual thing? How about actually, you know, replacing same. So, that comes

12:07.520 --> 12:13.280
under a different repository. The repository is called papel retrofit. So, retrofit was essentially

12:13.280 --> 12:19.920
a repository that allowed printed drivers or, you know, older printed drivers to be configured

12:19.920 --> 12:24.720
into diabolous emulators. What we've developed ahead and configured this for scene.

12:24.720 --> 12:29.920
So, scene scanner, scanner access, now easy. Now has a configuration for allowing, you know,

12:30.320 --> 12:34.720
legacy scanners to get supported into papel. So, that is about how we are providing

12:34.720 --> 12:40.640
a comprehensive scanner support and sort of providing a robust, you know, sandbox scanner application framework.

12:42.640 --> 12:48.880
So, the printer app, my dear here, the printer, printer emulation was sort of an IPP emulation,

12:48.880 --> 12:55.360
the internet printing services and scanner integration is sort of based on ESL which is a different

12:55.360 --> 13:02.320
protocol as specified by the MO Priya scan specifications. So, all you have to do is sort of interface

13:02.400 --> 13:07.760
managed different interfaces between same. Put the same drivers, the drivers that are actually,

13:07.760 --> 13:12.720
you know, legacy drivers into papel retrofit. papel will manage the application

13:12.720 --> 13:18.160
packaging of the application. It will sort of, you know, distribute the coding drivers that route

13:18.160 --> 13:22.720
there into papel application and then you have, Pingo, you have a sandbox scanner application out there.

13:25.760 --> 13:32.080
Cool. So, that was it. You can go ahead and connect with me on LinkedIn and we are, you can also

13:32.080 --> 13:37.680
go ahead. I have put the slides up there on, on my presentation link as well. So, you can go ahead

13:37.680 --> 13:43.440
and follow the GitHub and the current WIP, the work in progress, pull requests is actually going ahead.

13:43.440 --> 13:48.800
So, happy to connect with you all. Thank you. I hope you all have a wonderful time here in

13:48.800 --> 13:53.440
Brussels and for us. Thank you. Thanks a lot.

